<template>
  <div class="home">
    <div class="container">
      <h1 class="title">AI Agent 应用中心</h1>
      <p class="subtitle">选择您想要使用的 AI 应用</p>
      
      <div class="app-grid">
        <div class="app-card" @click="navigateTo('/love-app')">
          <div class="app-icon">💕</div>
          <h3>AI 恋爱大师</h3>
          <p>专业的恋爱咨询和情感指导</p>
          <div class="app-features">
            <span>实时对话</span>
            <span>情感分析</span>
            <span>个性化建议</span>
          </div>
        </div>
        
        <div class="app-card" @click="navigateTo('/manus-app')">
          <div class="app-icon">🤖</div>
          <h3>AI 超级智能体</h3>
          <p>多功能智能助手，解决各种问题</p>
          <div class="app-features">
            <span>智能问答</span>
            <span>任务处理</span>
            <span>知识库</span>
          </div>
        </div>
        
        <div class="app-card test-card" @click="navigateTo('/test')">
          <div class="app-icon">🔧</div>
          <h3>连接测试工具</h3>
          <p>诊断和测试后端连接问题</p>
          <div class="app-features">
            <span>连接测试</span>
            <span>SSE 诊断</span>
            <span>错误排查</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Home',
  methods: {
    navigateTo(path) {
      this.$router.push(path)
    }
  }
}
</script>

<style scoped>
.home {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.container {
  max-width: 800px;
  width: 100%;
  text-align: center;
}

.title {
  font-size: 3rem;
  color: white;
  margin-bottom: 10px;
  font-weight: 700;
}

.subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 50px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.app-card {
  background: white;
  border-radius: 20px;
  padding: 40px 30px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.app-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.app-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.app-card h3 {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 15px;
  font-weight: 600;
}

.app-card p {
  color: #666;
  margin-bottom: 25px;
  line-height: 1.6;
}

.app-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.app-features span {
  background: #f0f2f5;
  color: #555;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.test-card {
  border: 2px dashed #667eea;
}

.test-card:hover {
  border-color: #764ba2;
}

@media (max-width: 768px) {
  .title {
    font-size: 2rem;
  }
  
  .app-grid {
    grid-template-columns: 1fr;
  }
  
  .app-card {
    padding: 30px 20px;
  }
}
</style>
